console.log('----------------')
console.log('test4')

function wrapper(generatorFunction){
    return function (...args) {
        let generatorObject = generatorFunction(...args)
        generatorObject.next()
        return generatorObject
    }
}

const wrapped = wrapper(function* (){
    console.log(`First input: ${yield}`)
    return 'DONE'

})

wrapped().next('hello!')    // First input: hello!
